Introduction
The Gravity: IIC Ozone Sensor is based on electrochemical principles and it can measure the ambient O3 concentration accurately and conveniently. With high anti-interference ability, high stablility and high sensitivity, this arduino-compatible ozone sensor can be widely applied to fields like portable device, air quality monitoring device, disinfection cabinets and smart home...
This compact dfrobot ozone sensor supports IIC output, it is compatible with many mainboards like Arduino Uno, esp32, Raspberry Pi and so on. Its resolution can reach to 10ppb. It supports wide range input voltage: 3.3V to 5.5V. Moreover, the lifetime is as long as 2 years. With simple Gravity interface and practical sample code, you can build your own ozone concentration monitor easily and conveniently.
Features
- High sensitivity
- Low power consumption
- Excellent stability and anti-interference ability
- IIC Interface
- Temperature compensation, excellent linear output
- Long lifetime
- Compatible with both 3.3V and 5V micro-controllers
- Polarity protection
Specification
- Detection of Gases: Ozone
- Operating Voltage: 3.3 to 5.5V DC
- Output Signal: IIC output
- Measurement Range: 0 to 10ppm
- Resolution: 0.01ppm (10ppb)
- Preheat Time: 3 minutes
- Response Time: ≤90 seconds
- Recovery Time: ≤90 seconds
- Operating Temperature: -20℃ to 50℃
- Operating Humidity: 15 to 95%RH (no condensation)
- Storage Temperature: -20℃ to 50℃
- Lifetime: >2 years (in the air)
- Board Dimension: 1.06" x 1.46" / 27mm x 37mm
Board Overview
Num | Label | Description |
---|---|---|
1 | SDA | IIC System Data Line |
2 | SCL | IIC System Clock Line |
3 | GND | - |
4 | VCC | + |
Tutorial
Download the program to Arduino UNO and open the serial monitor to check the O3 concentration.
NOTE: The O3 concentration value will be stable after preheat time, which is about 3 minutes. Please ignore the O3 concentration value during preheat time.
Requirements
Hardware
- DFRduino UNO R3 (or similar) x 1
- Gravity: IIC Ozone Sensor x 1
Software
- Arduino IDE
- Download and install the DFRobot_OzoneSensor Library (About how to install the library?)
Connection Diagram
Sample Code
1.According to the connection diagram to connect the module to Arduino UNO. In default, the IIC address is 0x73 which corresponds to the ADDRESS_3 in the code. If you want to modify the I2C address, please configure the hardware IIC address by the dial switch and modify the IIC address part: ADDRESS_X in the sample code. The relationship between the dial switch and IIC address is shown as below:
- ADDRESS_0:0x70, A0=0, A1=0
- ADDRESS_1:0x71, A0=1, A1=0
- ADDRESS_2:0x72, A0=0, A1=1
- ADDRESS_3:0x73, A0=1, A1=1
2.Download and install the DFRobot_OzoneSensor Library (About how to install the library?)
3.Open Arduino IDE and upload the code below to Arduino UNO.
4.Open the Arduino IDE's serial monitor, adjust the baud rate to 9600, and observe the serial print results.
/*!
* @file ReadOzoneData.ino
* @brief Reading ozone concentration, A concentration of one part per billion (PPB).
* @n step: we must first determine the iic device address, will dial the code switch A0, A1 (ADDRESS_0 for [0 0]), (ADDRESS_1 for [1 0]), (ADDRESS_2 for [0 1]), (ADDRESS_3 for [1 1]).
* @n Then configure the mode of active and passive acquisition, Finally, ozone data can be read.
* @n note: it takes time to stable oxygen concentration, about 3 minutes.
*
* @n The experimental phenomenon is to print one billionth of the ozone concentration on the serial port.
* @n Because the value measured by the sensor is less than 10000, the value obtained will not be greater than 10000
*
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (https://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author ZhixinLiu(zhixin.liu@dfrobot.com)
* @version V0.2
* @date 2019-10-10
* @get from https://www.dfrobot.com
* @url */
#include "DFRobot_OzoneSensor.h"
#define COLLECT_NUMBER 20 // collect number, the collection range is 1-100
#define Ozone_IICAddress OZONE_ADDRESS_3
/* iic slave Address, The default is ADDRESS_3
ADDRESS_0 0x70 // iic device address
ADDRESS_1 0x71
ADDRESS_2 0x72
ADDRESS_3 0x73
*/
DFRobot_OzoneSensor Ozone;
void setup()
{
Serial.begin(9600);
while(!Ozone.begin(Ozone_IICAddress)) {
Serial.println("I2c device number error !");
delay(1000);
} Serial.println("I2c connect success !");
/* Set iic mode, active mode or passive mode
MEASURE_MODE_AUTOMATIC // active mode
MEASURE_MODE_PASSIVE // passive mode
*/
Ozone.SetModes(MEASURE_MODE_PASSIVE);
}
void loop()
{
/* Smooth data collection
COLLECT_NUMBER // The collection range is 1-100
*/
int16_t ozoneConcentration = Ozone.ReadOzoneData(COLLECT_NUMBER);
Serial.print("Ozone concentration is ");
Serial.print(ozoneConcentration);
Serial.println(" PPB.");
delay(1000);
}
Expected Results
Turn on the serial monitor and heat it up for about 3 minutes to get the final data. (Test environment: closed environment with ozone generator)
NOTE:
- This Gravity: IIC Ozone Sensor may has data drift.
- Please power it up for 24 hours when power it up for the first time.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.